<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
		<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
		<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
		<title>function</title>
	</head>
	<body>
		<div id="root"></div>

		<script type="text/babel">
			function Weather(props) {
				console.log(props);
				const {
					name,
					weather
				} = props
				return ( //函数式编程不需要render函数
					<ul>
						<li>date:{name}</li>
						<li>weather:{weather}</li>
					</ul>
				)
			}
			ReactDOM.render( < Weather name = "Monday"
				weather = "sunny" / > , document.getElementById('root'));
		</script>
	</body>
</html>
